Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Standard error objects for pug. This module is intended for use by the lexer, parser, loader, linker, code-generator and any plugins.
npm install pug-error
var error = require('pug-error');
error(code, message, options)
Create a Pug error object.
code
is a required unique code for the error type that can be used to pinpoint a certain error.
message
is a human-readable explanation of the error.
options
can contain any of the following properties:
filename
: the name of the file causing the errorline
: the offending linecolumn
: the offending columnsrc
: the Pug source, if available, for pretty-printing the error contextThe resulting error object is a simple Error object with additional properties given in the arguments.
Caveat: the message
argument is stored in err.msg
, not err.message
, which is occupied with a better-formatted message.
var error = require('pug-error');
var err = error('MY_CODE', 'My message', {line: 3, filename: 'myfile', src: 'foo\nbar\nbaz\nbash\nbing'});
// { code: 'PUG:MY_CODE',
// msg: 'My message',
// line: 3,
// column: undefined,
// filename: 'myfile',
// src: 'foo\nbar\nbaz\nbash\nbing',
// message: 'myfile:3\n 1| foo\n 2| bar\n > 3| baz\n 4| bash\n 5| bing\n\nMy message' }
throw err;
MIT
FAQs
Standard error objects for pug
The npm package pug-error receives a total of 300,056 weekly downloads. As such, pug-error popularity was classified as popular.
We found that pug-error demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.